package svc

import (
	"api/internal/config"
	"github.com/zeromicro/go-zero/zrpc"
	"taobao/taobaoclient"
)

type ServiceContext struct {
	Config config.Config
	TaoRpc taobaoclient.Taobao
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		TaoRpc: taobaoclient.NewTaobao(zrpc.MustNewClient(c.TaoRpc)),
	}
}
